export function rafThrottle(fn) {
  let locked = false
  return function (...args) {
    if (!locked) {
      locked = true
      window.requestAnimationFrame(() => {
        fn.call(this, ...args)
        locked = false
      })
    }
  }
}
